package com.xy.annotaion.handler.runner;

import com.xy.annotaion.handler.annotation.TestLog;
import com.xy.annotaion.handler.aop.bean.TestAopBean;
import com.xy.annotaion.handler.api.service.ITestService;
import com.xy.annotaion.handler.common.log.LogService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author Dell
 */
@Component
public class TestCommandLineRunnerImpl implements CommandLineRunner, LogService {

    @Resource
    private TestAopBean testAopBean;

    @Resource
    private ITestService testService;


    @Override
    @TestLog
    public void run(String... args) throws Exception {
        log(args);
        testAopBean.f();
        testAopBean.g();
        testService.test();
    }
}
